/*
* $Id: JournalDefined.h 58 2010-03-10 15:46:33Z volok-aleksej@yandex.ru $
*
* Copyright 2008-2009 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _JOURNAL_DEFINED_H_
#define _JOURNAL_DEFINED_H_
/************************************************************************/
/*                           Message's macros                           */
/************************************************************************/
#define DECLARE_MY_MESSAGE_MAP()	\
	virtual long OnWndMsg(unsigned int message, unsigned int wParam, long lParam)
#define BEGIN_MY_MESSAGE_MAP(class) \
	long class::OnWndMsg(unsigned int message, unsigned int wParam, long lParam){
#define ON_WND_MSG(msg, handler) \
	if(msg == message)\
		return handler(wParam, lParam);
#define ON_NOTIFY_MSG(Code, Id, handler) \
	if(message == WM_NOTIFY && ((LPNMHDR)lParam)->code == Code && ((LPNMHDR)lParam)->idFrom == Id)\
		return handler((LPNMHDR)lParam);
#define END_MY_MESSAGE_MAP() \
		return 0;\
	}
/************************************************************************/
/*                             Message manipulation						*/
/************************************************************************/
#define UM_ITEM_MANIPULATION WM_USER+10		//wParam - type manipulation;
											//lParam - parameter manipulation

/************************************************************************/
/*                         Journal enumeration                          */
/************************************************************************/
namespace JournalEnum{
//type manipulation
	enum typeItemMnpl{
		NONE = 0,
		ADD_POINT,							//lParam = null
		CHANGE_POINT,						//lParam = id of point
		DELETE_POINT,						//lParam = id of point
		ADD_FAMILY,							//lParam = id of parent point
		CHANGE_FAMILY,						//lParam = id of family
		DELETE_FAMILY,						//lParam = id of family
		ADD_INSPECT,						//lParam = id of parent family
		CHANGE_INSPECT,						//lParam = id of inspect
		DELETE_INSPECT						//lParam = id of inspect
	};
//number sheet of tab control
	enum tabNumber{
		INSPECT_JOURNAL = 0,
		QUEEN_BEE_JOURNAL,
		QUEEN_CELL_JOURNAL,
		WORK_JOURNAL,
		PUMP_JOURNAL
	};
// item's type of tree view control
	enum typeTreeItem{
		NOTSEL = 0,
		POINT,
		FAMILY
	};
//view of journal
	enum viewJournal{
		EMPTY_VIEW = 0,
		VIEW_POINT,
		VIEW_FAMILY,
		VIEW_INSPECT,
		VIEW_ADD_POINT,
		VIEW_CHANGE_POINT,
		VIEW_ADD_FAMILY,
		VIEW_CHANGE_FAMILY,
		VIEW_ADD_INSPECT,
		VIEW_CHANGE_INSPECT
	};
}
/************************************************************************/
/*                             id's windows                             */
/************************************************************************/
#define JOURNAL_TAB_CTRL_ID		0x3000
#define TREE_NAVIGATION_WND_ID  0x3010
#define VIEW_JOURNAL_WND_ID		0x3020
/************************************************************************/
/*                         id's window elements                         */
/************************************************************************/
#define BUTTON_ADD_ID		0x3021
#define BUTTON_DELETE_ID	0x3022
#define BUTTON_CHANGE_ID	0x3023
#define BUTTON_SAVE_ID		0x3024
#define BUTTON_CANCEL_ID	0x3025
#define HSCROLL_ID			0x3026
#define VSCROLL_ID			0x3027
#define DATE_FROM_ID		0x3028
#define DATE_TO_ID			0x3029
#define BUTTON_SHOW_ID		0x302a
/************************************************************************/
/*                          id's table headers                          */
/************************************************************************/
#define TABLE_POINT_NAME_ID				0x100
#define TABLE_POINT_NOTE_ID				0x101
#define TABLE_POINT_USER_ID				0x102
#define TABLE_FAMILY_NAME_ID			0x200
#define TABLE_FAMILY_TYPE_ID			0x201
#define TABLE_FAMILY_NOTE_ID			0x202
#define	TABLE_FAMILY_FRAME_ID			0x203
#define	TABLE_FAMILY_BEES_ID			0x204
#define	TABLE_FAMILY_HONEY_ID			0x205
#define	TABLE_FAMILY_BROOD_ID			0x206
#define	TABLE_FAMILY_WOX_ID				0x207
#define	TABLE_FAMILY_HOUSING_ID			0x208
#define	TABLE_FAMILY_EBQ_ID				0x209
#define	TABLE_FAMILY_BBQ_ID				0x20a
#define TABLE_FAMILY_USER_ID			0x20b
#define TABLE_INSPECT_DATE_ID			0x300
#define TABLE_INSPECT_FRAME_ID			0x301
#define TABLE_INSPECT_STRENGTH_ID		0x302
#define TABLE_INSPECT_EXIST_QBEE_ID		0x303
#define TABLE_INSPECT_WAX_ID			0x304
#define TABLE_INSPECT_AMBROSIA_ID		0x305
#define TABLE_INSPECT_PUMP_HONEY_ID		0x306
#define TABLE_INSPECT_FEEDING_ID		0x307
#define TABLE_INSPECT_DISEASES_ID		0x308
#define TABLE_INSPECT_NOTE_ID			0x309
#define TABLE_INSPECT_NAME_HOUSING_ID	0x30a
#define TABLE_INSPECT_BROOD_ID			0x30b
#define TABLE_INSPECT_HONEY_ID			0x30c
#define TABLE_INSPECT_OPEN_BROOD_ID		0x30d
#define TABLE_INSPECT_CLOSE_BROOD_ID	0x30e
#define TABLE_INSPECT_GOODS_HONEY_ID	0x30f
#define TABLE_INSPECT_USER_ID			0x310

#endif /*_JOURNAL_DEFINED_H_*/